package com.koicarp.university.graduate.service.service.graduateInfoManage;

import com.koicarp.university.graduate.service.dto.bigView.UNCompareEmployDto;

import java.util.Comparator;

/**
 * @auther liutao
 * @Date 2020-11-26 09:04:24
 * 比较器
 */
public class EmployComparator implements Comparator {
    @Override
    public int compare(Object o1, Object o2){
        UNCompareEmployDto p1 = (UNCompareEmployDto)o1;
        UNCompareEmployDto p2 = (UNCompareEmployDto)o2;
        if(p1.getNowYearEmployRate() > p2.getNowYearEmployRate()){
            return -1;
        }else if(p1.getNowYearEmployRate() == p2.getNowYearEmployRate()){
            return 0;
        }else{
            return 1;
        }
    }
}
